1. Field of the Invention
The present invention relates to an information processing apparatus, a control method for the same, and a storage medium, and in particular relates to an information processing apparatus that captures images of a measurement object on which multiple patterns are projected and processes information for obtaining three dimensional shape data regarding the measurement object, a control method for the same, and a storage medium.
2. Description of the Related Art
There is widely-known three dimensional measurement in which a projection apparatus and an image capturing apparatus are arranged in a known relationship, the image capturing apparatus captures an image of a measurement object on which pattern light is projected by the projection apparatus, and three dimensional shape data regarding the measurement object is obtained.                Japanese Patent Laid-Open No. 2007-192608 discloses technology for obtaining the three dimensional shape of a measurement object by projecting first bright-dark pattern light having bright portions and dark portions arranged alternately with an arbitrary width and second bright-dark pattern light obtained by shifting the phase of the first bright-dark pattern light, capturing images thereof, obtaining the tone distribution of each image, and calculating positions on an image sensor that correspond to intersections between the first and second bright-dark pattern light.        When light enters various types of light detecting elements, such as a CCD image sensor, that are used in image sensors, quantally-generated shot noise is unavoidably generated at the same time as signals corresponding to light intensity are obtained. With a conventional intersection detection technique, intersections are obtained by interpolating tone values in the tone distribution of tones obtained by sampling first and second brightness patterns at each imaging pixel.        
If captured images have been influenced by shot noise or other noise, intersections are calculated using tone values that include noise, and therefore the intersections have a margin of error due to noise. Regarding the influence that quantally-generated shot noise has on intersection detection, the amount of shot noise with respect to the intensity of light entering the image sensor relatively increases when the light intensity is low. For this reason, the SN ratio of the tone distribution decreases, and the margin of error in detected intersection positions increases.                On the other hand, when the intensity of light entering the image sensor is high, the amount of shot noise with respect to the light intensity is relatively low, the SN ratio improves over the case where the light intensity is low, and the margin of error in detected intersection positions decreases.        
However, if the intensity of light entering the image sensor is higher than necessary, the tone values of pixels used in intersection detection approach and then reach the maximum tone value of the image sensor. For this reason, if intersections are detected by interpolating tone values, the margin of error increases, and the ability to perform precise three dimensional measurement is lost.